﻿/*
 Copyright (c) 2015 ABB
 All rights reserved. This program and the accompanying materials
 are made available under the terms of the Eclipse Public License v1.0
 which accompanies this distribution, and is available at
 http://www.eclipse.org/legal/epl-v10.html
 
 Contributors:
    Christian Manteuffel (University of Groningen)
*/

using System.Collections.Generic;
using System.Runtime.InteropServices;
using AssumptionArchitect.Behavior;
using EA;
using EAFacade;
using EAFacade.Events;


namespace AssumptionArchitect
{
    [ComVisible(true)]
    public partial class MainApplication : EAEventAdapter
    {

        private readonly IList<IRepositoryListener> _listeners = new List<IRepositoryListener>();

        //init repository listener
        public MainApplication()
        {
            //_listeners.Add();
        }

        public override object EA_OnInitializeTechnologies(Repository repository)
        {
            // When overriding EAEventAdapter methods always include this call (in case the repository is one of the attributes) 
            // This updates the EARepository singleton to the lastest instance.
            EAMain.UpdateRepository(repository);
            return "";
            //const string resource = "DecisionArchitect." + "DecisionArchitectMDG.xml";
            //return Utils.GetResourceContents(resource);
        }

    }
}
